Method, mobile device and system for transmitting files

ABSTRACT

A method, a mobile device, and system for transmitting files are disclosed. The method includes a first mobile device transmitting a file to a second mobile device in a first transmission mode when receiving a file transmission request for transmitting the file to the second terminal from a user. In transmitting the file, the first mobile device judges in real-time whether the size of the remaining part of the file is greater than or equal to a preconfigured threshold; and if yes, judges whether the first mobile device is able to establish a connection with the second mobile device with a higher transmission rate than that in the first transmission mode. The first mobile device may then switch the transmission mode and adopt the second transmission mode to transmit the remaining part of the file.

CROSS REFERENCE

The application is a continuation of an International application NoPCT/CN2013/072996, which claims the benefit of a Chinese PatentApplication No. 201210084393.X, filed on Mar. 27, 2012, the disclosureof which is incorporated herein in its entirety by reference.

TECHNICAL FIELD

The present disclosure relates to communication technology, andparticularly to a method, mobile device and system for transmittingfiles.

BACKGROUND

With the development of wireless communication technology, nowadaysmobile devices have enabled file transmission through wirelesscommunication technology. However, existing solutions of filetransmission have respective ranges of application. Therefore it isparticularly important to choose suitable transmission modes accordingto the characteristics of files to be transmitted.

Conventionally, there are two technical solutions for file transmissionbetween mobile devices. The first solution is to transmit files throughBluetooth. Turn on the Bluetooth on two mobile devices, searchautomatically, and transmit files after having found the oppositeterminal. The second solution is by way of Wireless Fidelity (WIFI).Activate WIFI on both terminals, connect both terminals to a wirelesslocal area network (WLAN) through WIFI, find the opposite terminal, andthen transmit files to the opposite terminal through software such asInternet Protocol (IP) Messenger.

In the course of invention, the inventor found the following defects ofthe existing technical solutions. In the first solution, transmittingfiles through Bluetooth has a very limited rate, which extremely limitsthe efficiency of file transmission. While in the second solution, therate is also low when the WIFI signal quality is poor, which also limitthe efficiency of file transmission.

SUMMARY

To improve the transmission efficiency, embodiments of the presentinvention are to provide a method, mobile device and system fortransmitting files. The technical scheme is as follows:

An embodiment of the invention is implemented as a method fortransmitting files, and the method includes:

-   -   receiving, by a first mobile device, a request for transmitting        a file to a second mobile device from a user;    -   transmitting, by the first mobile device, the file to the second        mobile device in a first transmission mode;    -   judging in the process of transmitting the file whether the size        of a remaining part of the file is greater than or equal to a        preconfigured threshold;    -   judging whether the first mobile device is able to connect with        the second mobile device in a second transmission mode, and        whether the transmission rate in the second transmission mode is        higher than that in the first transmission mode, on condition        that the size of the remaining part of the file is greater or        equal to the preconfigured threshold; and    -   switching the transmission mode of the first mobile device to        the second transmission mode to transmit the remaining part of        the file on condition that the first mobile device is able to        connect with the second mobile device in a second transmission        mode, and the transmission rate in the second transmission mode        is higher than that in the first transmission mode.

The step of receiving the request for transmitting the file to thesecond mobile device includes:

-   -   confirming the request for transmitting the file to the second        mobile device is received when the first mobile device detects        that the user has pressed a send file button to perform an        operation of transmitting a file; or    -   confirming the request for transmitting the file to the second        mobile device is received when the first mobile device detects        that the user has touched and dragged the file outside a display        area of a screen and determines that an operation mode of the        file is a sending mode.

The step of transmitting the file to the second mobile device in thefirst transmission mode includes:

-   -   transmitting the file to the second mobile device in a default        transmission mode of the first mobile device;    -   transmitting the file to the second mobile device in a manually        selected transmission mode before the user send the request of        file transmission; or    -   selecting automatically a transmission mode for the first mobile        device and transmitting the file to the second mobile device in        the transmission mode selected.

Preferably, the method may further include:

-   -   displaying in real-time the remaining part of the file on a        screen during the process of transmitting the file until the        file transmission is complete on condition that the file is        opened and displayed when the user send the request.

To further illustrate, the first transmission mode is Bluetooth and thesecond transmission mode is WIFI or Wireless LAN Authentication andPrivacy Infrastructure (WAPI).

Optionally, the step of judging in the process of transmitting the filewhether the size of the remaining part of the file is greater than orequal to a preconfigured threshold includes:

-   -   judging in the process of transmitting the file whether the        first mobile device keeps a connection with the second mobile        device, and whether the size of the remaining part of the file        is greater than or equal to the preconfigured threshold;    -   on condition that the first mobile device keeps the connection        with the second mobile device in the first transmission mode and        the size of the remaining part of the file is greater than or        equal to the preconfigured threshold, proceeding to the step of        judging whether the first mobile device is able to connect with        the second mobile device in a second transmission mode, and        whether the transmission rate in the second transmission mode is        higher than that in the first transmission mode.

The method may further include:

-   -   on condition that the first mobile device disconnect with the        second mobile device in the first transmission mode, judging        whether the first mobile device could establish a connection        with the second mobile device in the second transmission mode;        and on condition that the first mobile device can establish a        connection with the second mobile device in the second        transmission mode, switching the first transmission mode to the        second transmission mode to transmit the remaining part of the        file.

Another objective of the embodiment of the present invention is toprovide a mobile device which includes:

-   -   a receiving module, configured to receive a request for        transmitting a file from a user;    -   a transmitting module, configured to send the file to a second        mobile device after receiving the request;    -   a judging module, configured to judge whether the size of the        remaining part of the file is greater than or equal to a        preconfigured threshold during the process of transmitting the        file by the transmitting module; and on condition that the size        of remaining part of the file is greater than or equal to the        preconfigured threshold, judge whether the first mobile device        is able to establish a connection with the second mobile device        under the second transmission mode and whether the transmission        rate of the second transmission mode is higher than that of the        first transmission mode; and    -   a switching module, configured to switch the transmission mode        of the mobile device to the second transmission mode to transmit        the remaining part of the file after the judging module decides        that the first mobile device is able to connect with the second        mobile device in a second transmission mode, and the        transmission rate in the second transmission mode is higher than        that in the first transmission mode.

The receiving module includes:

-   -   a first receiving unit, configured to detect that the user has        pressed a send file button to perform an operation of        transmitting the file, and confirm the request for transmitting        the file to the second mobile device is received; or    -   a second receiving unit, configured to detect that the user has        touched and dragged the file outside an display area of an        screen, judge whether an operation mode of the file is a sending        mode or a browse mode; and on condition that the operation mode        of the file is the sending mode, confirm the request for        transmitting the file to the second mobile device is received.

The transmitting module includes:

-   -   a first transmitting unit, configured to transmit the file to        the second mobile device in a default transmission mode of the        first mobile device;    -   a second transmitting unit, configured to transmit the file to        the second mobile device in a transmission mode manually        selected by the user before sending the file; or    -   a third transmitting unit, configured to automatically select a        transmission mode for the first mobile device and transmit file        to the second mobile device in the transmission mode selected.

The mobile device also includes:

-   -   a display module, configured to display in real-time the        remaining part of the file on the screen during the process of        transmitting the file until the file transmission is complete on        condition that the file is open and displayed when the user        sends the request.

The first transmission mode is Bluetooth and the second transmissionmode is WIFI or WAPI.

The judging module is configured to judge in real-time whether themobile device could keep a connection with the second mobile device, andto judge in real-time whether the size of the remaining part of the fileis greater than or equal to the preconfigured threshold;

-   -   on condition that the first mobile device could keep the        connection with the second mobile device and the size of the        remaining part of the file is greater than or equal to the        preconfigured threshold, the judging module is configured to        judge whether the first mobile device is able to connect with        the second mobile device in a second transmission mode, and        whether the transmission rate in the second transmission mode is        higher than that in the first transmission mode.

The judging module is further configured to judge whether the mobiledevice could establish a connection in the second transmission mode withthe second mobile device when the first mobile device disconnect withthe second mobile device;

-   -   the switching module is further configured to switch the        transmission mode of mobile device and adopt the second        transmission mode to transmit the remaining part of the file if        the mobile device could establish a connection with the second        mobile device in the second transmission mode.

Another objective of the embodiment of the present invention is toprovide a file transmission system, which includes the mobile devicedescribed above and a second mobile device; the second mobile device isconfigured to receive the file sent by the mobile device.

Another objective of the embodiment of the present invention is toprovide a computer-readable storage medium, which contains one or moreprograms. These programs could be executed by one or more processors tocarry out the methods in any of the embodiments.

Technical schemes provided by the embodiments have the followingbeneficial effects:

-   -   when the first mobile device is transmitting a file to the        second mobile device in a first transmission mode, the first        mobile device judges in real-time whether the size of the        remaining part of the file is greater than or equal to the        preconfigured threshold, and whether it could establish a        connection in a second transmission mode with the second mobile        device with a higher transmission rate than that in the first        transmission mode. If yes, the first mobile device switches the        transmission mode of the first mobile device and transmits the        remaining part of the file in the second transmission mode, thus        smart selection of transmission mode for file transmission        according to the size of remaining file and transmission rate        can be achieved and the transmission efficiency can be achieved.

This automatic selection of transmission mode for the user simplifiesthe user's operation procedures and increases convenience for the users.Furthermore, the request sent by the user by dragging the open anddisplayed file out of the screen to send the file can be supported and areal-time display of the remaining part of the file on the screen whichvisualizes the process of file transmission for users can also besupported. Therefore, user experiences would be enhanced.

BRIEF DESCRIPTION OF DRAWINGS

In order to illustrate the technical scheme of the present disclosure,hereafter a brief introduction would be given to the figures used in thedetailed description of embodiments. Obviously, figures below are merelysome of the embodiments of the present disclosure. For those skilled inthe art, they could obtain other figures basing on the current figureswithout any creative work.

FIG. 1 illustrates a flow chart of a method for transmitting files inEmbodiment I of the present disclosure.

FIG. 2 illustrates a flow chart of a method for transmitting files inEmbodiment II of the present disclosure.

FIG. 3 illustrates an interface sketch of transmitting files betweenmobile devices in Embodiment II of the present disclosure.

FIG. 4 illustrates a flow chart of a second method for transmittingfiles in Embodiment II of the present disclosure.

FIG. 5 illustrates a structure diagram of a mobile device provided inEmbodiment III of the present disclosure.

FIG. 6 illustrates a structure diagram of a second mobile deviceprovided in Embodiment III of the present disclosure.

DETAILED DESCRIPTION

Examples will now be described more fully with reference to theaccompanying drawings.

File transmitting in the present disclosure in particular refers to filetransmitting between mobile devices. The referred mobile devices includebut not limited to mobile phones, tablet PC, PDA and so forth. Thereferred types of mobile devices could be either a keyboard type or atouch screen type. The present disclosure has no particular limits. Whentransmitting file between two mobile devices, we could define one mobiledevice as a first mobile device and the other as a second mobile device.Different designation has nothing to do with the quality of mobiledevices, and this will not be further clarified hereinafter. The filetransmitted between mobile devices could be any type, including but notlimited to pictures, documents, audios, videos and so forth. The presentdisclosure has no particular limits.

Embodiment I

Referring to FIG. 1, the embodiment provides a method for transmittingfiles, specific steps as follows:

-   -   101: a first mobile device transmits a file to a second mobile        device when the first mobile device receives a request for        transmitting the file to the second mobile device from a user.    -   102: the first mobile device judges in the process of        transmitting the file whether the size of the remaining part of        the file is greater than or equal to a preconfigured threshold.    -   103: on condition that the size of the remaining part of the        file is greater or equal to a preconfigured threshold, the first        mobile device judges whether the following conditions can be        satisfied: the first mobile device is able to connect with the        second mobile device in a second transmission mode, and the        transmission rate in the second transmission mode is higher than        that in the first transmission mode.    -   104: the first mobile device switches the transmission mode of        the first mobile device and adopts the second transmission mode        to transmit the remaining part of the file on condition that the        above conditions can be satisfied.

In the above method, the first mobile device may confirm to havereceived the request for transmitting the file to the second mobiledevice sent by the user:

-   -   when the first mobile device detects that the user has pressed a        send file button to perform an operation of transmitting a file,        the request for transmitting the file to the second mobile        device is confirmed; or    -   when the first mobile device detects that the user has touched        and dragged the file outside a display area of a screen, the        first mobile device judges whether an operation mode of the file        is a sending mode or a browse mode; and if the operation mode of        the file is the sending mode, the request for transmitting the        file to the second mobile device is confirmed.

In the above method, the step of transmitting the file to the secondmobile device in the first transmission mode may include:

-   -   the first mobile device transmits the file to the second mobile        device in a default transmission mode of the first mobile        device, i.e. the first transmission mode;    -   the first mobile device transmits the file to the second mobile        device in a manually selected transmission mode (i.e. the first        transmission mode) before the user send the request of file        transmission; or    -   the first mobile device selects automatically a transmission        mode as the first transmission mode and transmits the file to        the second mobile device in the first transmission mode        selected.

Preferably, the method may further include:

-   -   displaying in real-time the remaining part of the file on a        screen during the process of transmitting the file until the        file transmission is complete on condition that the file is        opened and displayed when the user send the request.

To further illustrate, the first transmission mode can be Bluetooth andthe second transmission mode can be WIFI or WAPI.

Optionally, the step of the first mobile device judging in the processof transmitting the file whether the size of the remaining part of thefile is greater than or equal to a preconfigured threshold may include:

-   -   judging in the process of transmitting the file whether the        first mobile device keeps a connection with the second mobile        device, and whether the size of the remaining part of the file        is greater than or equal to the preconfigured threshold;    -   on condition that the first mobile device keeps connection with        the second mobile device in the first transmission mode and the        size of the remaining part of the file is greater than or equal        to the preconfigured threshold, proceeding to the step of        judging whether the above conditions can be satisfied;    -   on condition that the first mobile device disconnect with the        second mobile device in the first transmission mode, judging        whether the first mobile device could establish a connection        with the second mobile device in the second transmission mode;        and on condition that the first mobile device can establish a        connection with the second mobile device in the second        transmission mode, switching the first transmission mode to the        second transmission mode to transmit the remaining part of the        file.

In the method provided in the embodiment, when the first mobile deviceis transmitting a file to the second mobile device in the firsttransmission mode, the first mobile device judges in real-time whetherthe size of the remaining part of the file is greater than or equal tothe preconfigured threshold, and whether it could establish a connectionin the second transmission mode. If yes, the first mobile deviceswitches the transmission mode and transmits the remaining part of thefile in the second transmission mode, thus smart selection oftransmission mode for file transmission according to the size ofremaining part of the file and transmission rate can be achieved and thetransmission efficiency can be achieved.

In addition, the automatic selection of transmission mode for the usersimplifies the user's operation procedures and increases convenience forthe users. Furthermore, the request sent by the user by dragging theopen and displayed file out of the screen to send the file can besupported and a real-time display of the remaining part of the file onthe screen which visualizes the process of file transmission for userscan also be supported. Therefore, user experiences would be enhanced.

Embodiment II

Referring FIG. 2, the embodiment provides a method for transmittingfiles, and specific steps as follows:

-   -   201: the first mobile device detects that the user has touched        and dragged the file outside a display area of a screen, and the        first mobile device judges whether an operation mode of the file        is a sending mode or a browse mode; and if the operation mode of        the file is the sending mode, the request for transmitting the        file to the second mobile device is confirmed.

In the embodiment, a touchscreen mobile device is cited as example forthe first mobile device. In practical applications, the first mobiledevice can also be keyboard mobile device, in which scenario step 201could be replaced by the following steps:

-   -   when the first mobile device detects that the user has pressed a        send file button to perform an operation of transmitting a file,        the request for transmitting the file to the second mobile        device is confirmed. Specifically, the first mobile device could        provide a send file button in the menu of the request file for        the user, and on condition that the user has pressed the send        file button, then transmit the file to the second mobile device.        The present disclosure will not further elaborate on the        specific implementation process.

In the embodiment, the browse mode and the sending mode refer to twomodes of operation provided by the first mobile device to the user. Thebrowse mode refers to a mode that the user browses the file. In themode, touching and dragging the file are deemed as an operation of pageturning. For example, when an iPhone user browses pictures in a browsemode, sliding finger to the right turns a page and continues browsing.The sending mode refers to a mode that the user executes a file sendingoperation. In the mode, touching and dragging the file are deemed as arequest of transmitting the file. For example, when an iPhone user opensa picture and chooses the sending mode, the operation of sliding fingerto the edges triggers a file transmitting operation.

Wherein the first mobile device could let the user choose between thebrowse mode and the sending mode by setting virtual keys at theinterface. For example, setting two virtual keys, one for the browsemode and the other for the sending mode, the user chooses according tohis/her actual needs; or, setting a mode switching virtual key, clickingto choose the browse mode and clicking again to switch to the sendingmode and so forth. The present disclosure has no particular limits.

-   -   202: the first mobile device transmits the file to the second        mobile device in a first transmission mode.

Specifically, the first mobile device establishes a connection with thesecond mobile device in the first transmission mode, and transmits thefile to the second mobile device in the first transmission mode. Whenthe first mobile device establishes a connection with the second mobiledevice, the first mobile device has to search and identify the secondmobile device. The first mobile device can establish a connection withthe second mobile device in various ways like setting a password. Thepresent disclosure has no particular limits on that.

In addition, in the present step, the first mobile device could transmitthe file to the second mobile device through any of the following threemodes:

-   -   the first mobile device sets the first transmission mode as a        default transmission mode in advance, and transmits the file to        the second mobile device in the default transmission mode; or,    -   the first mobile device user manually selects a transmission        mode as the first transmission mode before the user sends the        request of file transmission, transmits the file to the second        mobile device in the manually selected transmission mode; or    -   the first mobile device automatically selects a transmission        mode as the first transmission mode and transmits the file to        the second mobile device accordingly; in this case, the first        mobile device sets the automatic selection rules in advance,        including automatically select a transmission mode with a higher        transmission rate, or automatically select the Bluetooth on        condition that the distance between two mobile devices is less        than the assigned distance and so forth. The present disclosure        has no particular limits on that.

When transmitting files, the first mobile device would encode the fileinto binary data stream and transmit the binary data stream to thesecond mobile device; the second mobile device receives the binary datastream and decodes the binary data stream.

-   -   203: the first mobile device judges in the process of        transmitting the file whether the size of the remaining part of        the file is greater than or equal to a preconfigured threshold.        If yes, proceed to step 204; otherwise, proceed to step 206.

In the embodiment, the preconfigured threshold refers to a pre-assignedcritical value of file size. When the size of the remaining part of thefile in the transmitting process is greater than or equal to thepreconfigured threshold, it means the remaining part of the file isstill large and requires a faster transmission mode so as to improvetransmission efficiency; when the size of the remaining part of the filein the transmitting process is smaller than the preconfigured threshold,it means the remaining part of the file is small and transmission couldbe soon completed under the current transmission mode, and transmissionmode does not need to be switched.

For example, for some small files, transmission can be completed veryquickly in Bluetooth, and then WIFI transmission does not need to beswitched on thus avoiding unnecessary switching process.

-   -   204: the first mobile device judges whether it could establish a        connection with the second mobile device under a second        transmission mode, and whether the transmission rate in the        second transmission mode is higher than that in the first        transmission. If yes, proceed to step 205; otherwise, proceed to        step 206.

In the embodiment, the first transmission mode and the secondtransmission mode include but not limited to: Bluetooth, WIFI or WAPI,in which the transmission rate of the second transmission mode is higherthan that of the first transmission mode. The present disclosure has noparticular limits on that. Preferably, the first transmission mode canbe Bluetooth, and the second transmission mode can be WIFI or WAPI.

Bluetooth is a short-range wireless communication technology with acommunication range of about 10 meters. It adopts a decentralizednetwork structure, fast frequency-hopping technology and short packagetechnology, which support point-to-point and point-to-multipointcommunications. For the reason that Bluetooth automatically searchesavailable Bluetooth terminals in current environment, in order to definethe identity of the Bluetooth terminal, we have to establish aconnection with the Bluetooth terminal before transmitting a filethrough Bluetooth, which means a personal identification code need to beutilized to ensure the security of connection, for example, settingdigital code to match and connect.

WIFI is a short-range wireless communication technology with a hightransmission rate and a wide signal coverage range, but is relativelypoor in terms of data security.

WAPI is a short-range wireless communication technology. Comparing withWIFI, WAPI has replaced the original identification mechanism andsecurity mechanism with pre-shared keys and certificates as well as SMS4encryption (sectionalized encryption) to enhance the wireless LANsecurity.

-   -   205: the first mobile device switches the first transmission        mode to the second transmission mode and transmits the remaining        part of the file. The above process completes.

Specifically, if the second transmission mode is WIFI or WAPI, the firstmobile device would obtain the IP address of the second mobile deviceafter the first mobile device establishes a connection with the secondmobile device through WIFI or WAPI. The first mobile device wouldanalyze the IP address based on ARP (Address Resolution Protocol) andconvert the IP address to a MAC address, and transmits the remainingpart of the file according to the MAC address.

-   -   206: the first mobile device transmits the remaining part of the        file under the first transmission mode. Till now the above        process completes.

In the embodiment, the method can further include the following steps:

-   -   the first mobile device displays in real-time the remaining part        of the file on the screen during the process of transmitting the        file until the file transmission is complete on condition that        the file is opened and displayed when the user send the request.

Specifically, pictures are used as an example of file to explain theprocess. See also in FIG. 3. If a picture is opened and displayed whenthe user send the picture, and one third of the picture has been draggedout of the screen of the first mobile device, the first mobile deviceencodes the one third of the picture into binary data stream andtransmits to the second mobile device. Simultaneously, the first mobiledevice would display in real-time the remaining two thirds of thepicture. On the other hand, after receiving the one third of thepicture, the second mobile device could decode the binary data streamand display the one third of the picture in real-time. Therefore, userexperience would be enhanced.

Now an example is cited by using Bluetooth as the first transmissionmode and WIFI as the second transmission mode for transmitting files togive a more detailed description. See also FIG. 4. The embodimentprovides a method of transmitting file, specific steps as follows:

-   -   401: the first mobile device transmits a file to the second        mobile device through Bluetooth when the first mobile device        receives a request from the user for transmitting the file to        the second mobile device and establishes a connection with the        second mobile device through Bluetooth.

Specifically, the first mobile device searches a list of all theavailable Bluetooth terminals through Bluetooth, and finds the secondmobile device and requests to establish a connection. Simultaneously,the first mobile device enters a user-defined code, and tells the codeto the second mobile device. When the second mobile device receives therequest of connection establishment, the second mobile device enters thecode. After verifying that the codes entered in the two mobile devicesare the same, the connection establishment completes.

-   -   402: the first mobile device judges in the process of        transmitting the file whether the size of the remaining part of        the file is greater than or equal to a preconfigured threshold.        If yes, proceed to step 403; otherwise, proceed to step 405.    -   403: the first mobile device judges whether the first mobile        device could connect with the second mobile device through WIFI,        and whether the transmission rate of WIFI is higher than that of        Bluetooth. If yes, proceed to step 404; otherwise, proceed to        step 405.

The basic equipment of wireless LAN includes at least a WLAN card and anAP (Access Point). The first mobile device equals to a WLAN card. Hence,the first mobile device accesses to a wireless LAN through an AP,judging whether it could find the IP address of the second mobile devicein the wireless LAN, and judge accordingly whether the first mobiledevice could establish a connection with the second mobile devicethrough WIFI.

-   -   404: the first mobile device switches Bluetooth into WIFI, and        transmits the remaining parts of the file through WIFI. The        above process completes.    -   405: the first mobile device judges whether the first mobile        device could connect with the second mobile device through WAPI,        and whether the transmission rate of WAPI is higher than that of        Bluetooth. If yes, proceed to step 406; otherwise, proceed to        step 407.

Specifically, the first mobile device would obtain the IP address of thesecond mobile device after the first mobile device establishes aconnection with the second mobile device. The first mobile device wouldanalyze the IP address based on ARP and convert the IP address to a MACaddress, and transmits the remaining part of the file according to theMAC address.

-   -   406: the first mobile device switches Bluetooth into WAPI, and        transmits the remaining parts of the file through WAPI. The        above process completes.    -   407: the first mobile device continues to transmit the remaining        parts of the file through Bluetooth. The above process        completes.

In the embodiment, in the step 203 or step 402, the step of the firstmobile device judging in the process of transmitting the file whetherthe size of the remaining part of the file is greater than or equal to apreconfigured threshold in real-time specifically includes:

-   -   judging during the process of transmitting the file by the first        mobile device whether the first mobile device keeps a connection        with the second mobile device, and whether the size of the        real-time remaining part of the file is greater than or equal to        the preconfigured threshold; if the first mobile device keeps        the connection with the second mobile device in the first        transmission mode and the size of the remaining part of the file        is greater than or equal to the preconfigured threshold,        executing the step of judging whether the first mobile device        could satisfy the conditions; if the first mobile device        disconnect with the second mobile device in the first        transmission mode, judging whether the first mobile device could        establish a connection with the second mobile device in the        second transmission mode; if yes, switches the first        transmission mode to the second transmission mode for        transmitting the remaining part of the file.

For example, the first mobile device transmits a file through WIFI, andit possesses both the functions of WAPI and Bluetooth. If the firstmobile device could keep a connection with the second mobile devicethrough WIFI, judge whether the size of the real-time remaining part ofthe file is greater than or equal to the preconfigured threshold andexecute the corresponding step; if the first mobile device disconnectwith the second mobile device in the mode of WIFI, judge whether thefirst mobile device could establish a connection with the second mobiledevice in another transmission mode, and since WAPI normally has ahigher transmission rate than Bluetooth, preferably judge whetherconnection could be established with the second mobile device in WAPImode. If the first mobile device could establish a connection with thesecond mobile device through WAPI, switch to WAPI for transmitting theremaining part of the file. If the first mobile device could notestablish a connection with the second mobile device through WAPI,judging whether the first mobile device could establish a connectionwith the second mobile device through Bluetooth, and if yes, switch toWAPI for transmitting the remaining part of the file.

In the method of transmitting files in the embodiment, the first mobiledevice judges in real-time whether the size of the remaining part of thefile is greater than or equal to the preconfigured threshold, andwhether it could establish a connection in the second transmission modeand whether the transmission rate of the second transmission mode ishigher than that of the first transmission mode when the first mobiledevice is transmitting a file to the second mobile device in the firsttransmission mode. If yes, the first mobile device switches thetransmission mode and transmits the remaining part of the file in thesecond transmission mode, thus a smart selection of transmission modefor file transmission according to the size of remaining file andtransmission rate can be achieved and the transmission efficiency can beenhanced.

In addition, the automatic selection of transmission mode for the usersimplifies the user's operation procedures and increases convenience forthe users. Furthermore, the request sent by the user by dragging theopen and displayed file out of the screen to send the file can besupported and a real-time display of the remaining part of the file onthe screen which visualizes the process of file transmission for userscan also be supported. Therefore, user experiences would be enhanced.

Embodiment III

Referring to FIG. 5, the embodiment provides a mobile device, including:

-   -   a receiving module 501, configured to receive a request for        transmitting a file from a user;    -   a transmitting module 502, configured to transmit a file to a        second mobile device in a first transmission mode when the        receiving module 501 receives a request;    -   a judging module 503, configured to judge in real-time whether        the size of the remaining part of the file is greater than or        equal to a preconfigured threshold when the transmitting module        502 transmits a file; on condition that the size of the        remaining part of the file is greater than or equal to a        preconfigured threshold, judge whether the following conditions        can be satisfied: the first mobile device is able to establish a        connection in a second mobile device, and the transmission rate        in the second transmission mode is higher than that in a first        transmission mode; and    -   a switching module 504, configured to switch the transmission        mode of the mobile device after the judging module decides that        the mobile device satisfies all the conditions, and adopt the        second transmission mode to transmit the remaining part of the        file.

Referring to FIG. 6, in the embodiment, the receiving module 501includes:

-   -   a first receiving unit 501A, configured to detect that the user        has pressed a send file button to perform an operation of        transmitting the file, and confirm the request for transmitting        the file to the second mobile device; or    -   a second receiving unit 501B, configured to detect that the user        has touched and dragged the file outside an display area of an        screen, judge the operation mode of the file to decide whether        it is a sending mode or a browse mode; and on condition that it        is the sending mode, confirm the request for transmitting the        file to the second mobile device,

In the embodiment, the transmitting module 502 includes:

-   -   a first transmission unit 502A, configured to use a default        transmission mode to transmit a file to a second mobile device;    -   a second transmission unit 502B, configured to adopt a user's        manually selected transmission mode to transmit a file to a        second mobile device before the user sends a request; or    -   a third transmission unit 502C, configured to automatically        select a transmission mode for the first mobile device and        transmit the file to the second mobile device in the        transmission mode selected.

Referring to FIG. 6, in the embodiment, the mobile device may furtherinclude:

-   -   a display module 505, configured to display in real-time the        remaining part of the file on the screen during the process of        transmitting the file until the file transmission is complete on        condition that the file is opened and displayed when the user        sends the request.

In the embodiment, preferably, the first transmission mode can beBluetooth and the second transmission mode can be WIFI or WAPI.

In the embodiment, the judging module 503 is configured to judge inreal-time whether the mobile device could keep a connection with thesecond mobile device, and to judge in real-time whether the size of theremaining part of the file is greater than or equal to the preconfiguredthreshold.

On condition that the first mobile device could keep the connection withthe second mobile device and the size of the remaining part of the fileis greater than or equal to the preconfigured threshold, proceed to thestep of judging whether the conditions can be satisfied.

On condition that the mobile device disconnects with the second mobiledevice in the first transmission mode, judge whether it is possible thatthe mobile device reconnects with a second mobile device in a secondtransmission mode. If yes, adopt a second transmission mode to transmitthe remaining part of the file.

The aforementioned mobile device provided in the embodiment couldperform any of the file transmission methods provided in theaforementioned method embodiments. For detailed process please refer tothe description in method embodiment, and it will not be discussed againherein.

When transmitting a file in a first transmission mode to a second mobiledevice, the mobile device provided in the embodiment judges in real-timewhether the size of the remaining part of the file is greater than orequal to a preconfigured threshold and whether it is possible toestablish a connection in a second transmission mode with the secondmobile device with a higher transmission rate than that in the firsttransmission mode; if yes, switch the transmission mode of the mobiledevice and adopt the second transmission mode to transmit the remainingpart of the file, and thereby improving file transmission efficiency

In addition, it simplifies the user's operation procedures and providesconvenience for the users. Furthermore, the request sent by the user bydragging the opened and displayed file out of the screen to send thefile can be supported and a real-time display of the remaining part ofthe file on the screen which visualizes the process of file transmissionfor users can also be supported. Therefore, the user experience could beenhanced.

Embodiment IV

The embodiment provides a file transmission system, including a mobiledevice described above in embodiment III and a second mobile device;

The second mobile device is configured to receive the file sent from themobile device.

The functions of the mobile device in the embodiment are the same withthat in embodiment III, which will not be discussed again herein.

The embodiment is able to perform the methods in any of theaforementioned method embodiments. For detailed process please refer tothe description of the method embodiment

The aforementioned system provided in the embodiment could judge inreal-time whether the size of the remaining part of the file is greaterthan or equal to the preconfigured threshold when transmitting the fileto the second mobile device in the first transmission mode, and whetherit is possible to establish a connection with the second mobile devicein the second transmission mode with a higher transmission rate thanthat in the first transmission mode; if yes, switch the transmissionmode of the mobile device and adopt a second transmission mode totransmit the remaining part of the file. In this way, it improves thefile transmission efficiency by selecting the file transmission mode inan intelligent manner according to the size of the remaining part of thefile. In addition, it simplifies the user's operation procedures andprovides convenience for the users. Furthermore, the request sent by theuser by dragging the open and displayed file out of the screen to sendthe file can be supported and a real-time display of the remaining partof the file on the screen which visualizes the process of filetransmission for users can also be supported. Therefore, the userexperience could be enhanced

Embodiment V

The embodiment provides a computer-readable storage medium, whichcontains one or more programs. These programs could be executed by oneor more processors to carry out the methods as follows.

When a first mobile device receives a user's request for transmitting afile to a second mobile device, transmitting the file to the secondmobile device in a first transmission mode;

In the process of transmitting the file, judging in real-time whetherthe size of the remaining part of the file is greater than or equal to apreconfigured threshold;

When the size of the remaining part of the file is greater than or equalto the preconfigured threshold, judging whether the following conditioncan be satisfied: the first mobile device is able to establish aconnection in a second transmission mode with the second mobile device,and the transmission rate of the second transmission mode is higher thanthat in the second transmission mode.

On condition that the first mobile device satisfies the conditions,switch the transmission mode of the first mobile device and adopt thesecond transmission mode to transmit the remaining part of the file.

In one mode of execution, the first mobile device receives the requestsent by the user for transmitting a file to a second mobile device,including:

-   -   when the first mobile device detects that the user has pressed a        send file button, judging the user-initiated request for        transmitting the file to a second mobile device; or    -   when the first mobile device detects that the user has touched        and dragged the file outside a display area of a screen, an        operation mode of the file needs to be judged and whether it is        sending mode or browse mode needs to be decided; if it is        sending mode, the request for transmitting the file to the        second mobile device is confirmed.

In another mode of execution, the step of transmitting the file to thesecond mobile device in the first transmission mode includes:

-   -   transmitting the file to the second mobile device in a default        transmission mode of the first mobile device; or    -   transmitting the file to the second mobile device in a manually        selected transmission mode before the user send the request; or    -   selecting automatically a transmission mode for the first mobile        device and transmitting the file to the second mobile device.

In another mode of execution, the method may further include:

-   -   displaying in real-time the remaining part of the file on the        screen during the process of transmitting the file until the        file transmission is complete on condition that the file is open        and displayed when the user send the request.

In the embodiment, the first transmission mode can be Bluetooth and thesecond transmission mode can be WIFI or WAPI.

In another mode of execution, in the process of transmitting the file,judging in real-time whether the size of the remaining part of the fileis greater than or equal to a preconfigured threshold, including:

-   -   judging in real-time during the process of transmitting the file        whether the first mobile device could keep a connection with the        second mobile device, and whether the size of the remaining part        of the file is greater than or equal to the preconfigured        threshold;    -   on condition that the first mobile device could keep the        connection with the second mobile device in the first        transmission mode and the size of the remaining part of the file        is greater than or equal to the preconfigured threshold, the        step of judging whether the mobile device satisfies all the        conditions is executed.

In another mode of execution, the method further includes:

-   -   on condition that the first mobile device disconnects with the        second mobile device in the first transmission mode, judging        whether the first mobile device could establish a connection        with the second mobile device in the second transmission mode;        and on condition that the first mobile device could establish a        connection with the second mobile device in the second        transmission mode, switching the first transmission mode to the        second transmission mode for transmitting the remaining part of        the file.

According to another example of the present disclosure, a mobile deviceis provided, which includes: one or more processors; a memory; and oneor more programs stored in the memory and to be executed by the one ormore processors, the one or more programs comprise instructions to:

-   -   receive a request for transmitting a file to a second mobile        device from a user;    -   transmit the file to the second mobile device in a first        transmission mode;    -   judge in real-time whether the size of a remaining part of the        file is greater than or equal to a preconfigured threshold in        the process of transmitting the file;    -   judge whether the first mobile device is able to establish a        connection with the second mobile device in a second        transmission mode and whether the transmission rate of the        second transmission mode is higher than that of the first        transmission mode, on condition that the size of the remaining        part of the file is greater than or equal to the preconfigured        threshold; and    -   switch the transmission mode of the first mobile device to the        second transmission mode to transmit the remaining part of the        file on condition that the first mobile device is able to        establish a connection with the second mobile device in the        second transmission mode and the transmission rate of the second        transmission mode is higher than that of the first transmission        mode.

According to the above embodiments, when transmitting a file to a secondmobile device in a first transmission mode, the aforementionedcomputer-readable storage medium provided in the embodiment judges inreal-time whether the size of the remaining part of the file is greaterthan or equal to the preconfigured threshold, and whether it is possibleto establish a connection with a second mobile device in a secondtransmission mode with a higher transmission rate than that in the firsttransmission mode; if yes, switch the first transmission mode to thesecond transmission mode for transmitting the remaining part of thefile. In this way, it improves the file transmission efficiency byselecting the file transmission mode in an intelligent manner accordingto the size of the remaining part of the file. In addition It furthersimplifies the user operation procedures and provides convenience forthe users. Furthermore, the request sent by the user by dragging theopen and displayed file out of the screen to send the file can besupported and a real-time display of the remaining part of the file onthe screen which visualizes the process of file transmission for userscan also be supported. Therefore, user experiences would be enhanced.

It should be noted herein: when the aforementioned file transmissiondevice provided in the embodiments transmits a file, the division of thefunctional modules is used to illustrate only. In real-lifeapplications, these functions may be assigned to and completed bydifferent functional modules as needed, i.e., divide the internalstructure of the apparatus into different functional modules to completeall or part of the aforementioned functions. In addition, the mobiledevice and file transmission method provided in the aforementionedembodiment relate to the same idea, and the specific implementationprocess is detailed in method embodiment, which will not be discussedagain herein.

The sequence number used to number the aforementioned embodiments of thepresent invention is for description purpose only, and does not indicatethe merits of the embodiments.

All or part of the steps of the embodiments of the present invention maybe implemented using software; the corresponding software program may bestored in a readable storage medium, such as a disc or a hard disk.

The aforementioned embodiments of the present invention are preferredembodiments, and are not intended to limit the present invention. Anymodifications, equivalent replacement, improvement etc. within thespirit and principles of the present invention shall be included in thescope of protection of the present invention.

What is claimed is:
 1. A method for transmitting files, the methodcomprising: receiving, by a first mobile device, a request fortransmitting a file to a second mobile device from a user; transmitting,by the first mobile device, the file to the second mobile device in afirst transmission mode; judging in real-time whether the size of aremaining part of the file is greater than or equal to a preconfiguredthreshold in the process of transmitting the file; judging whether thefirst mobile device is able to establish a connection with the secondmobile device in a second transmission mode and whether the transmissionrate of the second transmission mode is higher than that of the firsttransmission mode, on condition that the size of the remaining part ofthe file is greater than or equal to the preconfigured threshold; andswitching the transmission mode of the first mobile device to the secondtransmission mode to transmit the remaining part of the file oncondition that the first mobile device is able to establish a connectionwith the second mobile device in the second transmission mode and thetransmission rate of the second transmission mode is higher than that ofthe first transmission mode; wherein transmitting the file in the firsttransmission mode to the second mobile device comprises: using a defaulttransmission mode of the first mobile device to transmit the file to thesecond mobile device; using a transmission mode manually selected by theuser to transmit the file to the second mobile device before the usersends the request; or selecting automatically a transmission mode forthe first mobile device to transmit the file to the second mobiledevice.
 2. The method according to claim 1, wherein receiving therequest for transmitting the file to the second mobile device from theuser; comprises: confirming the request for transmitting the file to thesecond mobile device is received when the first mobile device detectsthat the user has pressed a send file button to perform an operation oftransmitting a file; or confirming the request for transmitting the fileto the second mobile device is received when the first mobile devicedetects that the user has touched and dragged the file outside a displayarea of a screen and determines that an operation mode of the file is asending mode.
 3. The method according to claim 1, further comprising:displaying the remaining part of the file in real-time on a screen inthe process of transmitting the file until the entire file transmissionis complete, on condition that the file is opened and displayed when theuser sends the request.
 4. The method according to claim 1, wherein thefirst transmission mode is Bluetooth and the second transmission mode isWIFI or WAPI.
 5. The method according to claim 1, wherein in the processof transmitting the file, judging in real-time whether the size of theremaining part of the file is greater than or equal to the preconfiguredthreshold comprises: judging in real-time whether the connection betweenthe first mobile device could keep a connection with the second mobiledevice, and whether the size of the remaining part of the file isgreater than or equal to the preconfigured threshold; and proceeding tothe step of judging whether the first mobile device is able to establisha connection with the second mobile device in a second transmission modeand whether the transmission rate of the second transmission mode ishigher than that of the first transmission mode on condition that thefirst mobile device could keep the connection with the second mobiledevice and the size of the remaining part of the file is greater than orequal to the preconfigured threshold.
 6. The method according to claim5, further comprising: judging whether the first mobile device couldestablish a connection with the second mobile device in the secondtransmission mode on condition that the first mobile device disconnectswith the second mobile device in the first transmission mode, if yes,switching the transmission mode of the first mobile device to the secondtransmission mode to transmit the remaining part of the file.
 7. Amobile device, comprising: a receiving module, configured to receive arequest for transmitting a file to a second mobile device from a user; atransmitting module, configured to transmit the file to the secondmobile device in a first transmission mode when the receiving modulereceives the request; a judging module, configured to judge in real-timewhether the size of the remaining part of the file is greater than orequal to a preconfigured threshold when the transmitting moduletransmits the file, and on condition that the size of the remaining partof the file is greater than or equal to the preconfigured threshold,judging whether the first mobile device is able to establish aconnection with the second mobile device in a second transmission modeand whether the transmission rate of the second transmission mode ishigher than that of the second transmission mode; and a switchingmodule, configured to switch the transmission mode of the mobile deviceto the second transmission mode to transmit the remaining part of thefile after the judging module decides that the first mobile device isable to establish a connection with the second mobile device in a secondtransmission mode and the transmission rate of the second transmissionmode is higher than that of the second transmission mode; wherein thetransmitting module comprises: a first transmission unit, configured totransmit the file to the second mobile device in a default transmissionmode of the first mobile device; or a second transmission unit,configured to transmit the file to the second mobile device in atransmission mode manually selected by the user before the user sendsthe request; or a third transmission unit, configured to automaticallyselect a transmission mode for the first mobile device and transmit thefile to the second mobile device in the transmission mode selected. 8.The mobile device according to claim 7, wherein the receiving modulecomprises: a first receiving unit, configured to detect that the userhas pressed a send file button to perform an operation of transmittingthe file, and confirm the request for transmitting the file to a secondmobile device is received; or a second receiving unit, configured todetect that the user has touched and dragged the file outside a displayarea of a screen and judge whether an operation mode of the file is asending mode or a browse mode; confirm the request for transmitting thefile to the second mobile device is received on condition that theoperation mode of the file is sending mode.
 9. The mobile deviceaccording to claim 7, further comprising: a display module, configuredto display in real-time the remaining part of the file on a screenduring the process of transmitting the file until the file transmissionis complete on condition that the file is opened and displayed when theuser sends the request.
 10. The mobile device according to claim 7,wherein the first transmission mode is Bluetooth and the secondtransmission mode is WIFI or WAPI.
 11. The mobile device according toclaim 7, wherein the judging module is configured to judge in real-timewhether the mobile device could keep a connection with the second mobiledevice in the process of transmitting the file, and to judge inreal-time whether the size of the remaining part of the file is greaterthan or equal to the preconfigured threshold; and the judging module isconfigured to judge whether the first mobile device is able to establisha connection with the second mobile device in a second transmission modeand whether the transmission rate of the second transmission mode ishigher than that of the second transmission mode on condition that thefirst mobile device could keep the connection with the second mobiledevice and the size of the remaining part of the file is greater than orequal to the preconfigured threshold.
 12. The mobile device according toclaim 11, wherein the judging module is further configured to judgewhether the first mobile device could establish a connection in thesecond transmission mode with the second mobile device when the firstmobile device disconnects with the second mobile device; and theswitching module is further configured to switch the transmission modeof the mobile device to the second transmission mode to transmit theremaining part of the file on condition that the mobile device couldestablish a connection with the second mobile device in the secondtransmission mode.
 13. A mobile device, comprising: one or moreprocessors; a memory; and one or more programs stored in the memory andto be executed by the one or more processors, the one or more programscomprise instructions to: receive a request for transmitting a file to asecond mobile device from a user; transmit the file to the second mobiledevice in a first transmission mode; judge in real-time whether the sizeof a remaining part of the file is greater than or equal to apreconfigured threshold in the process of transmitting the file; judgewhether the first mobile device is able to establish a connection withthe second mobile device in a second transmission mode and whether thetransmission rate of the second transmission mode is higher than that ofthe first transmission mode, on condition that the size of the remainingpart of the file is greater than or equal to the preconfiguredthreshold; and switch the transmission mode of the first mobile deviceto the second transmission mode to transmit the remaining part of thefile on condition that the first mobile device is able to establish aconnection with the second mobile device in the second transmission modeand the transmission rate of the second transmission mode is higher thanthat of the first transmission mode; wherein transmit the file in thefirst transmission mode to the second mobile device comprises: using adefault transmission mode of the first mobile device to transmit thefile to the second mobile device; using a transmission mode manuallyselected by the user to transmit the file to the second mobile devicebefore the user sends the request; or selecting automatically atransmission mode for the first mobile device to transmit the file tothe second mobile device.
 14. A non-transitory computer-readable storagemedium, comprising a set of instructions for transmitting files, the setof instructions to direct at least one processor to perform acts of:receiving a request for transmitting a file to a second mobile devicefrom a user; transmitting the file to the second mobile device in afirst transmission mode; judging in real-time whether the size of aremaining part of the file is greater than or equal to a preconfiguredthreshold in the process of transmitting the file; judging whether thefirst mobile device is able to establish a connection with the secondmobile device in a second transmission mode and whether the transmissionrate of the second transmission mode is higher than that of the firsttransmission mode, on condition that the size of the remaining part ofthe file is greater than or equal to the preconfigured threshold; andswitching the transmission mode of the first mobile device to the secondtransmission mode to transmit the remaining part of the file oncondition that the first mobile device is able to establish a connectionwith the second mobile device in the second transmission mode and thetransmission rate of the second transmission mode is higher than that ofthe first transmission mode; wherein transmit the file in the firsttransmission mode to the second mobile device comprises: using a defaulttransmission mode of the first mobile device to transmit the file to thesecond mobile device; using a transmission mode manually selected by theuser to transmit the file to the second mobile device before the usersends the request; or selecting automatically a transmission mode forthe first mobile device to transmit the file to the second mobiledevice.